-include_lib("ect/include/ect.hrl").

-module(classupdate).

-import_class(pattern1).
-import_class(pattern2).

-export([dotest/0]).

dotest() ->
    #pattern2{a = xa, b = xb, c = xc} = a(#pattern2{}),
    pass.

a(#pattern1{} = A) ->
    A#pattern1{c = xc, a = xa, b = xb}.